﻿using System;
using System.Linq;
using System.Collections.Generic;
using System.Text;

namespace SeizyUtils.Common.Data.Database
{
    class DBConfig
    {
        public string server { get; set; }
        public string userId { get; set; }
        public string password { get; set; }
        public string initialCatalog { get; set; }

        /// <summary>
        /// 接続文字列を生成します。
        /// </summary>
        /// <param name="displayPassword"></param>
        /// <returns></returns>
        public string getConnectionString(bool displayPassword)
        {
            return string.Format("Data Source={0:s};User ID={1:s};Password={2:s};Initial Catalog={3:s};"
                , server, userId, displayPassword ? password : "*****", initialCatalog);
        }
    }
}
